The present invention relates in general to the telecommunications field and, in particular, to echo cancellation in telephone systems.
Echo cancelers are commonly used in telephone systems to remove acoustical and electrical echoes that may occur due to reflections of the signal in the communication lines. Some causes of electrical echoes may be caused by hybrid circuit splits or imperfect terminations in subscriber loops. A hybrid circuit is a device that converts a four wire line into a two wire line at a private branch exchange (PBX). Acoustical echoes may occur in speaker phone systems due to poor isolation of the microphone used in the system. These electrical and acoustical echoes disturb the quality of the transmission over the system thereby affecting the quality of the conversation between users of the communication system.
To ensure high quality and pure data transmission, the ITU-T (International Telecommunications Union, Telecommunications Standardization Sector) suggests in their recommendation G.131 the use of echo cancelers. The use of echo cancelers is extremely desirable for data links having a total round trip transmission time of more than 50 milliseconds. Typically, users do not hear echoes when the round trip transmission time is less than 50 milliseconds.
Echo cancelers are commonly used in many different types of telephone systems. For example, they may be used in an asynchronous transfer mode network (ATM), a synchronous digital hierarchy (SDH) network, a plesiochronous digital hierarchy (PDH) network, an Internet protocol (IP) network, or mobile servicing switching centers (MSCs).
Many echo cancelers make use of adaptive linear filters to calculate an estimate of the echo that is introduced by the hybrid nearest the user. These adaptive filters are constantly adapting coefficients while a voice signal is detected in order to converge on a solution to remove the echo from the communication line. Fast and reliable convergence of the filter coefficients is crucial to the overall performance of the echo canceler. The adaptive linear filters used in echo cancelers today have difficulty in handling signal sequences that have a predominantly periodic characteristic. Often, the periodic signal characteristics are detected so late that the quality of echo canceling worsens due to an improper filter adaptation. Instead of the filter coefficients converging upon a solution, they diverge, resulting in poor echo canceling or even overcompensation of the signal. This divergence and overcompensation is worsened by the fact that present adaptive echo canceler systems begin adaptation of the filter coefficients too early and stop adaptation of the filter coefficients too late.
Adaptive filters used in echo cancelers typically use a fixed time frame register to detect predominantly sinusoidal signal characteristics. The adaptation of the filter coefficients is enabled or disabled depending solely on the current result of signal evaluation obtained during the fixed time frame. Typically, a Fourier transformation is conducted on the signal and the spectrum is evaluated to detect periodic signals.
FIG. 1 illustrates how a conventional adaptive echo canceler detects a voice signal or periodic signal. FIG. 1 displays a graph 120 of a periodic signal and a voice signal. A voice signal 102 is centered between two sinusoidal periodic signals 100. A sliding evaluation window, X-register 80, holds a portion of the signal shown in graph 120. The X register 80 holds a finite number of samples of the combined periodic and voice signals based on the size of the register. The X-register 80 is filled with new sample values as time is incremented. Once the X-register 80 is fill, the samples that were first loaded into the X-register 80 are discarded.
Below the graph 120 is a timing diagram indicating when the echo canceler detects the presence of a voice signal based on the contents of the X-register 80. At time t_1 a voice signal is detected. It can be seen, however, at this time t_1 the X-register 80, contains a portion of the periodic signal 100 along with a portion of the voice signal 102. This is generally undesirable since it may cause the canceler to diverge. From time t_1 to a time t_2 when the voice signal is no longer detected, the echo canceler in the prior art approaches would be allowed to adapt the filter coefficients. Instead of the filter coefficients converging, however, the filter coefficients may diverge from the correct solution because the X-register includes samples of the periodic signal.
As illustrated by the preceding example, the problems with traditional echo cancelers include divergence or poor convergence of the filter coefficients due to the fact that the adaptation of the filter coefficients is begun too early while a significant subset of the predominantly periodic signal value is still present in the sampling window and the detection of a predominantly periodic signal characteristic may take so long that the sinusoidal signal leads to bad echo canceler performance. Without a flexible adjustment it is difficult to adapt the echo canceling algorithm to the properties of the voice characteristics and/or the echo path, or to trade off between speed of convergence of the filter coefficients and filter protection. Finally, use of the Fourier transform requires extensive calculation.
Given these shortcomings, there is a need for an adaptive filter system that provides a fast and flexible detection of voice and periodical signals to allow the filter coefficients to converge quickly.
Briefly described, the present invention is an echo canceler that quickly detects the presence of periodic signals and is optimized for fast convergence of the filter coefficients. The present invention distinguishes between voice and periodic, or no-voice signals, by creating a histogram of the amplitude values of the signal that are currently held in a fixed time frame register. If a certain, configurable percentage of the sample values fall within the interval created by a lower amplitude limit and a maximum amplitude limit, a voice detection unit recognizes this as a no-voice signal. On the other hand, if a configurable percentage of sample values do not fall within this interval, the voice detection unit detects a voice signal. If a voice signal is detected, an additional amount of hysteresis time, is allowed to lapse until an adaptive linear filter is allowed to begin adapting filter coefficients.
In one embodiment of the invention, the histogram is formed from the signal received during a predetermined configurable evaluation time. This evaluation time is chosen short enough such that the histogram can react quickly to periodic signals, but large enough to avoid frequently halting the adaptation of the filter coefficients which would occur if short periodic signals were detected based on the histogram. Additionally, the evaluation time is preferably larger than the inverse of the low end cut off frequency of the voice signal. Once the evaluation time is chosen, the hysteresis time is selected to ensure that the periodic signal has dropped out of the register.
The amplitude limits are allowed to adapt over time based on the incoming communication signal. This adaptation of the amplitude limits allows a voice or periodic signal to be detected sooner than conventional methods resulting in better convergence of the filter coefficients. Additionally, a high end cut off limit and low end cut off limit may be defined to remove noise from the incoming communication signal. Any sampled values of the signal that are above or below these cut off limits are not considered in the histogram.
The filter coefficients of the adaptive filter should only be adapted when the fixed time frame register is filled with a voice signal. Therefore, a hysteresis time is chosen long enough such that no periodic signal is present in the fixed time frame register but short enough to avoid freezing the filter coefficients too long.
The present invention is not only important for echo canceling, but for any kind of voice processing device. For example, some devices utilize voice breaks in telecommunication to transmit other data. Applying a hysteresis time between these breaks may help in reducing or avoiding collisions when sharing a single channel for multiple concurrent data transmissions.